﻿using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Windows;

namespace 控件测试
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        //启动时调用
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            Trace.WriteLine("1,OnStartup被触发");
        }

        //激活时调用
        protected override void OnActivated(EventArgs e)
        {
            base.OnActivated(e);
            Trace.WriteLine("2,OnActivated被触发");
        }

        //激活变为非集合时调用
        protected override void OnDeactivated(EventArgs e)
        {
            base.OnDeactivated(e);
            Trace.WriteLine("3,OnDeactivated被触发");
        }

        //程序退出时调用
        protected override void OnExit(ExitEventArgs e)
        {
            base.OnExit(e);
            Trace.WriteLine("4,OnExit被触发");
        }
    }
}